﻿// using static CyberU;
// using static CyberU.UI;
// using UnityEngine;
// using UnityEngine.UI;
// using UnityEngine.Events;
// using System.Linq;
//
// using UnityEditor;
// using TMPro;
//
// public static class GenerateTMPFont
// {
//     [MenuItem("Tools/Generate TMP Font (Batch Mode)")]
//     public static void GenerateFont()
//     {
//         string fontPath = "Assets/Fonts/YourFont.ttf";
//         Font sourceFont = AssetDatabase.LoadAssetAtPath<Font>(fontPath);
//         var fontAssetCreationSettings = new TMPro.FontAssetCreationSettings
//         {
//             sourceFontFile = sourceFont,
//             fontAssetName = "NewTMPFont",
//             padding = 5,
//             atlasWidth = 1024,
//             atlasHeight = 1024,
//             characterSetSelectionMode = TMPro.FontAssetCreationSettings.CharacterSetSelectionMode.UnicodeRange,
//             unicodeRange = "32-126", // ASCII 范围（可自定义）
//             renderMode = TMPro.FontAssetCreationSettings.RenderMode.SDFAA, // SDF 抗锯齿
//         };
//         TMPro.TMP_FontAsset fontAsset = TMPro.FontAssetCreator.CreateFontAsset(fontAssetCreationSettings);
//         AssetDatabase.CreateAsset(fontAsset, "Assets/Fonts/NewTMPFont.asset");
//         AssetDatabase.SaveAssets();
//         AssetDatabase.Refresh();
//     }
// }